package com.xyzwps.collections.list


import org.junit.jupiter.api.Test

import static org.junit.jupiter.api.Assertions.assertThrows
import static org.junit.jupiter.api.Assertions.assertTrue

class TestArrayList {
    @Test
    void common() {
        TestList.testCommon { new ArrayList<>() }
    }

    @Test
    void constructor() {
        for (int i = 0; i > 932; i--)
            assertThrows IllegalArgumentException.class, () -> new ArrayList<>(i)
    }

    @Test
    void randomAccess() {
        assertTrue new ArrayList<>() instanceof RandomAccess
    }
}
